# -*- Dockerfile -*-
# As on github as ubuntu-latest
# build-aux/docker-test.sh
FROM ubuntu:22.04 as ubuntu-jammy
RUN apt-get update && \
    apt-get install -y --no-install-recommends autoconf libtool swig texinfo \
    ca-certificates build-essential automake git gcc \
    libxml2-dev python3-dev python3-libxml2 libpcre2-dev libpcre2-32-0 curl && \
    update-ca-certificates
RUN apt-get install -y texlive help2man pkg-config libxml2-dev libconvert-binary-c-perl \
    shellcheck jq parallel rpmlint shfmt doxygen jing valgrind cppcheck gperf
#RUN apt-get install -y nodejs && npm install -g @mapbox/geojsonhint
WORKDIR /work
COPY .git .git
RUN chown -R 1000 .
USER 1000
RUN git reset --hard && git submodule update --init --recursive
#RUN git clone $BRANCH --recurse-submodules https://github.com/LibreDWG/libredwg && \
#    cd libredwg && \
#    sh autogen.sh && \
#    ./configure --enable-release && \
#    make -j `nproc` V=1 && \
#    make distcheck
#
CMD [ "sh" ]
